﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CondominioG1.Dominio.Vivienda>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>Codigo</th>
            <th>Ubicacion</th>
            <th>Numero</th>
            <th>Metraje</th>
            <th>Tipo</th>
            <th>Residente</th>
            <th>Propietario</th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Editar", "Edit", new { Codigo = item.Codigo }) %> |
                <%: Html.ActionLink("Detalles", "Details", new { Codigo = item.Codigo })%> |
                <%: Html.ActionLink("Eliminar", "Delete", new { Codigo = item.Codigo })%>
            </td>
            <td>
                <%: item.Codigo %>
            </td>
            <td>
                <%: item.Ubicacion %>
            </td>
            <td>
                <%: item.Numero %>
            </td>
            <td>
                <%: String.Format("{0:F}", item.Metraje) %>
            </td>
            <td>
                <%: item.Tipo %>
            </td>
            <td>
                <%: item.Residente.Dni %>
            </td>
            <td>
                <%: item.Propietario.Dni %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Crear", "Create") %>
    </p>
    
    <form id="Form1" runat="server">
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <%: Html.ActionLink("Listar x Ubicación", "Listar", new { Ubicacion = "A51" })%> 
    </form>
</asp:Content>

